Type Definitions

The following type definitions are available globally.

  • Type for objects that describe a component category to use for fallbacks using HUBComponentFallbackHandler

    An application using the Hub Framework can declare any number of categories to use when performing fallback logic for components, in case an unknown component namespace/name combo was encountered.

    Ideally, a component category should be generic enough to apply to a range of components with similar visuals and behavior, but still contain enough information for a HUBComponentFallbackHandler to create appropriate fallback components based on them.

    Declaration

    Objective-C

    typedef NSString *HUBComponentCategory
  • Type for objects that describe a layout trait to use in a HUBComponentLayoutManager to compute margins

    Margins between various components and the content edge of a view is determined by inspecting the layout traits of a given component. Each component has the opportunity to declare its traits through the layoutTraits property of HUBComponent.

    An application using the Hub Framework may declare additional traits using this type, as its up to the implementation of HUBComponentLayoutManager (controlled by the application) to determine how to map traits to absolute margins.

    Ideally, a layout trait should be generic enough to apply to a broad range of components, but still contain enough information for a HUBComponentLayoutManager to make correct decisions based on them.

    Declaration

    Objective-C

    typedef NSString *HUBComponentLayoutTrait
  • Block type used when running a custom block as a JSON path operation

    Declaration

    Objective-C

    typedef id _Nullable (^HUBMutableJSONPathBlock)(NSObject *_Nonnull)